/**
 * HRDC客户api
 */

import axios from '@/libs/api.request'
export default class HRDCCustomerApi {
  // 客户公海导出
  static ExportCustomers (params) {
    return axios.request({
      url: '/SalesCustomer/ExportCustomers',
      method: 'post',
      data: params
    })
  }
  // 客户私有导出
  static ExportPrivateCustomers (params) {
    return axios.request({
      url: '/SalesCustomer/ExportPrivateCustomers',
      method: 'post',
      data: params
    })
  }
  // 获取hrdc公海客户列表
  static GetPublicCustomers (params) {
    return axios.request({
      url: '/SalesCustomer/GetPublicCustomers',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 获取销售人员列表
  static GetVisibleTreeList (params) {
    return axios.request({
      url: '/User/GetVisibleTreeList',
      method: 'get',
      params: params
    })
  }
  // 客户交付获取签约销售
  static GetTreeList (params) {
    return axios.request({
      url: '/User/GetTreeList',
      method: 'get',
      params: params
    })
  }
  // 拾取客户
  static SetPrivate (params) {
    return axios.request({
      url: '/SalesCustomer/SetPrivate',
      method: 'get',
      params: params
    })
  }
  // 拾取客户 0421
  static Pickup (params) {
    return axios.request({
      url: '/SalesCustomer/Pickup',
      method: 'post',
      data: params
    })
  }
  // 抛出客户
  static SetPublic (params) {
    return axios.request({
      url: '/SalesCustomer/SetPublic',
      method: 'get',
      params: params
    })
  }
  // 新建客户
  static PostCustomer (params) {
    return axios.request({
      url: '/SalesCustomer/PostCustomer',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 获取客户基本信息
  static GetCustomer (params) {
    return axios.request({
      url: '/SalesCustomer/GetCustomer',
      method: 'get',
      params: params
    })
  }

  // 获取联系人列表
  static ContacterList (params) {
    return axios.request({
      url: '/SalesCustomer/ContacterList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 新建联系人
  static PostContacter (params) {
    return axios.request({
      url: '/SalesCustomer/PostContacter',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 删除联系人
  static DeleteContracter (params) {
    return axios.request({
      url: '/SalesCustomer/DeleteContracter',
      method: 'delete',
      params: params
    })
  }
  // 新建沟通记录
  static PostCommunication (params) {
    return axios.request({
      url: '/SalesCustomer/PostCommunication',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 获取沟通记录列表
  static CommunicationList (params) {
    return axios.request({
      url: '/SalesCustomer/CommunicationList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 删除沟通记录
  static DeleteCommunication (params) {
    return axios.request({
      url: '/SalesCustomer/DeleteCommunication',
      method: 'delete',
      params: params
    })
  }

  // 获取hrdc私有客户列表
  static GetPrivateCustomers (params) {
    return axios.request({
      url: '/SalesCustomer/GetPrivateCustomers',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 标记为KA客户/普通客户
  static BatchUpdateSignType (params) {
    return axios.request({
      url: '/SalesCustomer/BatchUpdateSignType',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 获取客户需求下拉数据源
  static GetSelectIdList (params) {
    return axios.request({
      url: '/SysBasedata/GetSelectIdList?type=RequirementType',
      method: 'get',
      params: params
    })
  }

  // 获取客户需求树结构
  static GetSelectIdTreeSource (params) {
    return axios.request({
      url: '/SysBasedata/GetSelectIdTreeSource?type=RequirementType',
      method: 'get',
      params: params
    })
  }

  // 添加客户预算
  static PostBudget (params) {
    return axios.request({
      url: '/SalesCustomer/PostBudget',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 获取客户预算列表
  static BudgetList (params) {
    return axios.request({
      url: '/SalesCustomer/BudgetList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 获取hrdc潜在客户列表
  static GetPotentialCustomers (params) {
    return axios.request({
      url: '/SalesCustomer/GetPotentialCustomers',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 添加或修改客户需求
  static PostRequirement (params) {
    return axios.request({
      url: '/SalesCustomer/PostRequirement',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 详情获取客户需求列表
  static RequirementList (params) {
    return axios.request({
      url: '/SalesCustomer/RequirementList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 添加或修改2D诊断表
  static Post2DDiagnoseInfo (params) {
    return axios.request({
      url: '/SalesCustomer/Post2DDiagnoseInfo',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 获取2D诊断表
  static Get2DDiagnoseInfo (params) {
    return axios.request({
      url: '/SalesCustomer/Get2DDiagnoseInfo',
      method: 'get',
      params: params
    })
  }

  // 获取A类需求
  static GetRequirementItems (params) {
    return axios.request({
      url: '/SalesCustomer/GetRequirementItems',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 关闭需求
  static CloseRequirement (params) {
    return axios.request({
      url: '/SalesCustomer/CloseRequirement',
      method: 'get',
      params: params
    })
  }

  // 添加或修改客户方案
  static PostPlan (params) {
    return axios.request({
      url: '/SalesCustomer/PostPlan',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }
  // 详情获取客户方案列表
  static getPlanList (params) {
    return axios.request({
      url: '/SalesCustomer/PlanList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 下载方案附件
  static DownPlanFile (params) {
    return axios.request({
      url: 'SalesCustomer/DownPlanFile',
      method: 'get',
      params: params
    })
  }

  // 获取B类需求
  static GetPlanItems (params) {
    return axios.request({
      url: '/SalesCustomer/GetPlanItems',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 添加或修改议价
  static PostBargain (params) {
    return axios.request({
      url: '/SalesCustomer/PostBargain',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 详情获取客户议价（合作需求）列表
  static getBargainList (params) {
    return axios.request({
      url: '/SalesCustomer/BargainList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 获取C类需求
  static GetBargainItems (params) {
    return axios.request({
      url: '/SalesCustomer/GetBargainItems',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 添加或修改销售合同
  static PostSalesContract (params) {
    return axios.request({
      url: '/SalesCustomer/PostSalesContract',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 详情获取改销售合同列表
  static getSalesContractList (params) {
    return axios.request({
      url: '/SalesCustomer/SalesContractList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 获取D类需求
  static GetSalesContractItems (params) {
    return axios.request({
      url: '/SalesCustomer/GetSalesContractItems',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 提交待交付信息三楼
  static PostProductDeliveryFor3 (params) {
    return axios.request({
      url: '/ProductDelivery/PostProductDeliveryFor3',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 提交待交付信息一楼
  static PostProductDeliveryFor1 (params) {
    return axios.request({
      url: '/ProductDelivery/PostProductDeliveryFor1',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 详情获取待分配的交付信息
  static GetToAllocationList (params) {
    return axios.request({
      url: '/ProductDelivery/GetToAllocationList',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 详情获取待交付信息列表
  static GetListToDelivery (params) {
    return axios.request({
      url: '/ProductDelivery/GetListToDelivery',
      method: 'post',
      data: params,
      enctype: 'multipart/form-data'
    })
  }

  // 详情获取已交付信息列表
  static GetDeliveryList (params) {
    return axios.request({
      url: '/ProductDelivery/GetDeliveryList',
      method: 'post',
      params: params,
      enctype: 'multipart/form-data'
    })
  }

  // 详情获取客户反馈列表
  static GetFeedBackList (params) {
    return axios.request({
      url: '/ProductDelivery/GetFeedBackList',
      method: 'post',
      params: params,
      enctype: 'multipart/form-data'
    })
  }

  // 下载附件
  static DownLoadAttachment (params) {
    return axios.request({
      url: '/Customer/DownLoadAttachment',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
  // 删除附件
  static DeleteAttachment (params) {
    return axios.request({
      url: '/Customer/DeleteAttachment',
      method: 'delete',
      params: params
    })
  }

  // 数据统计汇总
  static GetStatsTotal (params) {
    return axios.request({
      url: '/SalesCustomer/GetStatsTotal',
      method: 'post',
      data: params
    })
  }

  // 数据统计明细
  static GetStatsDetails (params) {
    return axios.request({
      url: '/SalesCustomer/GetStatsDetails',
      method: 'post',
      data: params
    })
  }

  // 统计导出
  static ExportStatsDetails (params) {
    return axios.request({
      url: '/SalesCustomer/ExportStatsDetails',
      method: 'post',
      data: params
    })
  }

  // 客户来源下拉数据
  static getCustomerSource (params) {
    return axios.request({
      url: '/SysBasedata/GetSelectIdList?type=CustomerSource',
      method: 'get',
      params: params
    })
  }

  // 私有客户-标记客户标签
  static batchSetCustomerTag (params) {
    return axios.request({
      url: '/SalesCustomer/BatchSetCustomerTag',
      method: 'post',
      data: params
    })
  }

  // 导出潜在客户
  static exportPotentialCustomers (params) {
    return axios.request({
      url: '/SalesCustomer/ExportPotentialCustomers',
      method: 'post',
      data: params
    })
  }

  // 导出明细需求
  static exportRequirement (params) {
    return axios.request({
      url: '/SalesCustomer/ExportRequirement',
      method: 'post',
      data: params
    })
  }

  // 导出共识方案
  static exportPlan (params) {
    return axios.request({
      url: '/SalesCustomer/ExportPlan',
      method: 'post',
      data: params
    })
  }

  // 导出商务机会
  static exportBargain (params) {
    return axios.request({
      url: '/SalesCustomer/ExportBargain',
      method: 'post',
      data: params
    })
  }

  // 导出合作签约
  static exportContract (params) {
    return axios.request({
      url: '/SalesCustomer/ExportContract',
      method: 'post',
      data: params
    })
  }

  // 添加或者修改客户
  static postCustomer (params) {
    return axios.request({
      url: '/SalesCustomer/PostCustomer',
      method: 'post',
      data: params
    })
  }

  // 关闭需求
  static closeRequirement  (params) {
    return axios.request({
      url: '/SalesCustomer/CloseRequirement ',
      method: 'post',
      data: params
    })
  }

  // 姓名下拉列表数据源
  static GetSelectList (params) {
    return axios.request({
      url: '/User/GetVisibleList',
      method: 'get',
      params: params
    })
  }

  // 删除客户
  static DeleteCustomer (params) {
    return axios.request({
      url: '/SalesCustomer/DeleteCustomer',
      method: 'post',
      data: params
    })
  }
}
